1. Field of the Invention
The present invention relates to a technology for positioning a head of a magnetic tape device.
2. Description of the Related Art
In a controller of a magnetic tape device (hereinafter, “magnetic tape controller”) that reads data from and writes data to a magnetic tape, it has been common that, when positioned at a file specified by a host computer, such as a mainframe computer, in a multifile magnetic tape written with a plurality of files, a magnetic head sequentially reads a header label written at the head of each file from the beginning of the magnetic tape and is positioned sequentially at each file until the specified file is found.
FIG. 9 is a schematic for explaining the conventional process of positioning the head of the magnetic tape. FIG. 9 depicts part of files written to the magnetic tape. In FIG. 9, “HD1” and “HD2” are header labels written at the head of the files; “DAT” is user data; “EOF1” and “EOF2” are end labels written at the end of the files; and “TM” is separator data for separating the header labels, the user data, and the end labels. Further, “SPF” is a command for skipping the files recorded on the magnetic tape. i.e., moving the magnetic head from one TM to another TM; and “RD” is a command for reading labels and the user data recorded on the magnetic tape, i.e., reading a label and data at a position where the magnetic head is positioned.
Positioning of the magnetic head at X-th file in the magnetic tape is explained. FIGS. 10 and 11 are sequence diagrams for explaining the conventional head positioning process. The host computer, the magnetic tape controller built into the magnetic tape device, and a magnetic tape driving device are shown in FIG. 10 and FIG. 11. Based on various requests transmitted by the host computer, the magnetic tape controller controls the magnetic tape driving device, thereby reading data from and writing data to the magnetic tape.
First, the host computer transmits a skip request to the magnetic tape controller (see (1) of FIG. 9 and FIG. 10), and the magnetic tape controller receives the skip request and transmits an SPF command to the magnetic tape driving device. Upon receiving the SPF command, the magnetic tape driving device causes the magnetic head to skip the data from a position at which the magnetic head is currently positioned to the next TM. Due to this, the magnetic head is positioned at the HD1 of (X−1)-th file. After positioning the magnetic head at the HD1, the magnetic tape driving device transmits a response indicating successful positioning (hereinafter, “positioning success response”) to the magnetic tape controller, and the magnetic tape controller transfers the positioning success response to the host computer.
Upon receiving the positioning success response, the host computer transmits a read request (a read request of data) to the magnetic tape controller (see (2) of FIG. 9 and FIG. 10). Upon receiving the read request, the magnetic tape controller transmits an RD command to the magnetic tape driving device. Upon receiving the RD command, the magnetic tape driving device reads the HD1 of the (X−1)-th file from the magnetic tape and transmits the read HD1 to the magnetic tape controller. The magnetic tape controller transfers the received HD1 to the host computer.
Upon receiving the HD1, the host computer determines that the received HD1 is not the HD1 of the target file (X-th file) and transmits the skip request twice to the magnetic tape controller (see (3), (4) of FIG. 9 and FIG. 10). Upon receiving the skip request twice, the magnetic tape controller transfers the SPF command twice to the magnetic tape driving device. Upon receiving the SPF command twice, the magnetic tape driving device positions the magnetic head at the EOF1 of the (X−1)-th file and transmits a positioning success response to the magnetic tape controller. The magnetic tape controller transfers the received positioning success response to the host computer.
Upon receiving the positioning success response, the host computer transmits a read request to the magnetic tape controller (see (5) of FIG. 9 and FIG. 10). Upon receiving the read request, the magnetic tape controller transmits the RD command to the magnetic tape driving device. Upon receiving the RD command, the magnetic tape driving device reads the EOF1 of the (X−1)-th file from the magnetic tape and transmits the read EOF1 to the magnetic tape controller. The magnetic tape controller transfers the received EOF1 to the host computer.
Upon receiving the EOF1, the host computer determines that the magnetic head has reached the end of the file and transmits a skip request to the magnetic tape controller (see (6) of FIG. 9 and FIG. 11). Upon receiving the skip request, the magnetic tape controller transmits the SPF command to the magnetic tape driving device. Upon receiving the SPF command, the magnetic tape driving device positions the magnetic head at the HD1 of the X-th file and transmits a positioning success response to the magnetic tape controller. The magnetic tape controller transfers the received positioning success response to the host computer.
Upon receiving the positioning success response, the host computer transmits a read request to the magnetic tape controller (see (7) of FIG. 9 and FIG. 11). Upon receiving the read request, the magnetic tape controller transmits the RD command to the magnetic tape driving device. Upon receiving the RD command, the magnetic tape driving device reads the HD1 of the X-th file from the magnetic tape and transmits the read HD1 to the magnetic tape controller. The magnetic tape controller transfers the received HD1 to the host computer.
Upon receiving the HD1, the host computer determines that the received HD1 is the HD1 of the target file (X-th file) and transmits the read request for confirmation to the magnetic tape controller (see (8) of FIG. 9 and FIG. 11). Upon receiving the read request; the magnetic tape controller transmits the RD command to the magnetic tape driving device. Upon receiving the RD command, the magnetic tape driving device reads the HD2 of the X-th file from the magnetic tape and transmits the read HD2 to the magnetic tape controller. Upon receiving the HD2, the magnetic tape controller transfers the HD2 to the host computer. Upon receiving the HD2, the host computer determines that the magnetic head is positioned at the target file (X-th file) (see (9) of FIG. 11). Next, the magnetic tape controller and the magnetic tape driving device carry out a reading process and a writing process of data according to an instruction from the host computer (see (10) of FIG. 11).
Thus, in the conventional process of positioning the magnetic head of the magnetic tape, the magnetic head confirms the header label of each file while sequentially skipping the files from the head of the magnetic tape until the magnetic head is positioned at the target file. Due to this, the head positioning process requires significantly long time.
For example, in a method disclosed in Japanese Patent Application Laid-Open No. H6-259930, position data, which includes a correspondence between a start position of a file and a number of spindle rotations and a correspondence between an end position of the file and a number of spindle rotations, is recorded in a predetermined area at the head of the magnetic tape. During loading of the magnetic tape, the position data is loaded in a memory of the magnetic tape device. When positioning the magnetic head at the target file, the number of spindle rotations corresponding to the start position of the target file is fetched from the position data loaded in the memory. The spindle is rotated with a high speed until a number of spindle rotations correspond to the fetched number of spindle rotations. Thus, the method enables to position the magnetic head at the target file within a short time.
However, in the conventional method, because the number of spindle rotations is used to position the magnetic head at the target file, during occurrence of an error in the spindle rotations due to external shocks or component fatigue, accurately positioning the magnetic head at a start position of the target file becomes difficult.
Although recently recording media such as a magnetic disk or a magneto optical disk are widely used, the magnetic tape plays an important role as a recording medium for backup of such recording media.
Thus, there is a need of a technology for reliably and swiftly positioning the magnetic head at a target file.